#ifndef IO_PORT_H
#define IO_PORT_H
#include "DigitalPort.h"
#include "AnalogPort.h"
class IOPort
{
public:
    IOPort(DigitalPort& dport,AnalogPort& aport);
    ~IOPort();

    DigitalInOut& dio(uint8_t id);
    DigitalInOut& dio0();
    DigitalInOut& dio1();
    DigitalInOut& dio2();
    DigitalInOut& dio3();

    PwmOut& pwm(uint8_t id);
    PwmOut& pwm0();
    PwmOut& pwm1();
    PwmOut& pwm2();
    PwmOut& pwm3();

    DigitalInOut& aio(uint8_t id);
    DigitalInOut& aio0();
    DigitalInOut& aio1();
    DigitalInOut& aio2();
    DigitalInOut& aio3();

    AnalogIn& ain(uint8_t id);
    AnalogIn& ain0();
    AnalogIn& ain1();
    AnalogIn& ain2();
    AnalogIn& ain3();
private:
    DigitalPort& _dport;
    AnalogPort& _aport;
};

#endif